A computer program is a set of instructions or operations for a computer to perform. The computer program is typically stored on a computer readable medium accessible by the computer, such as a storage area or memory of the computer. The computer can retrieve an instruction from memory, perform the instruction, retrieve the next instruction, and so forth. The storage area can also contain data that is operated on by the instructions.
A computer program can be generally classified as an interactive program or as a batch program. An interactive program “interacts” with a user in that the program can require input from the user and can provide an output to the user. An example of an interactive program is a Web browser.
A batch program is designed to run without interaction with the user. A batch program can be started, for example, by a user through the use of an interactive program, or can be set to run automatically at a certain time. Once started, the batch program will run without requiring user interaction. Examples of batch programs include printing requests and certain computationally intensive numerical analysis programs.
A computer program is typically created in a high-level computing language, such as Fortran90, C, C++, etc. Statements written in the high-level computing language form a source code file, which can be compiled (by an appropriate compiler) into an object file. The source code file is a human-readable form of the computer program, while the object file is in a machine language. The machine language can be optimized to work with a particular computer architecture (e.g., a particular central processing unit (CPU) with its specific logic architecture and set of possible computer instructions). Alternatively, the machine language can be designed to run on any computer platform having the appropriate interpreter (e.g., Java virtual machine).
Many applications require the use of both interactive and batch programs. For example, in the data processing arena, an interactive program can be used in a front-end to interface directly with a user. A batch program can then be run in the back-end to perform the actual data processing functions requested by the user. The front-end program can interact directly with the back-end program or can use an intermediate program (e.g., an application program interface (API)) that mediates the front-end and back-end activities. The front-end program and the back-end program can be running on computers that are remotely located with respect to each other, or can be running on the same computer system.
The front-end program and the back-end program are required to interact with each other, such that the user's instructions to the front-end program are carried out by the back-end program. The front-end program and the back-end program, however, are different programs, which are often written by different programmers. For example, the front-end program can be designed to operate with a graphical user interface (GUI) to provide for ease of interfacing with a user. Thus, a programmer familiar with the intricacies of the GUI may be employed to write the front-end program. The back-end program, however, needs no user interface, as it typically interacts with either the front-end program or an API.
In some cases, it can be beneficial for the front-end program to perform some of the same functions as the back-end program. However, when a modification is desired to be made to a function performed by the program (e.g., due to an improvement in a process algorithm), both the front-end program and the back-end program must be modified, along with the corresponding GUI file, documentation file, etc.
A software package typically includes a plurality of computer programs, each designed to perform a different function or process. The computer programs (the called programs), can generally be called by another computer program (a calling program) that requires the function to be performed. In order to successfully perform a program call, the calling program must be able to supply the called program with the appropriate input (and, perhaps, output) parameters. Thus, the calling program can be required to know the function(s) performed and the parameter(s) required by the called program. If the calling program is not aware of the parameter(s) required, the calling program will be unable to successfully perform the program call.
As apparent from the above-described deficiencies, a need exists for an application program interface for a computer program, and a method and apparatus for interfacing with the computer program, such that a computer program can be used to perform a function, without regard to its location in either the front-end or the back-end of a computer system. Additionally, a need exists for an application program interface that can allow a computer program to be called, even when the calling program is not aware of the parameter(s) required by the called program.